#!/usr/bin/env python3
# -*- coding: utf-8 -*-
""" gtm 服务启动程序 """
from flask import Flask
from flask_cors import CORS
from gtm_server.controllers.login import login_bp
from gtm_server.controllers.position import position_bp
from gtm_server.controllers.user import user_bp
from gtm_server.controllers.task import task_bp

# 服务实例化和蓝图注册
app = Flask(__name__)
# 设置跨域
CORS(app, supports_credentials=True)


# 注册服务蓝图
app.register_blueprint(login_bp)
app.register_blueprint(position_bp)
app.register_blueprint(user_bp)
app.register_blueprint(task_bp)


# 服务启动
if __name__ == "__main__":
    app.run(port=8080, debug=True)

